package com.sanjishu.enterlab.electricity.sale.service;

import com.sanjishu.enterlab.electricity.sale.domain.ContractSetting;
import com.sanjishu.enterlab.electricity.sale.mapper.ContractSettingMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContractSettingService {

    @Autowired
    private ContractSettingMapper contractSettingMapper;

    public ContractSetting getSettingByContract(Integer contractInfoId) {
        return contractSettingMapper.findByContractId(contractInfoId);
    }

    public List<ContractSetting> listSettingByCompany(Integer companyId) {
        return contractSettingMapper.listSettingByCompany(companyId);
    }

    public ContractSetting findByContractId(Integer contractId) {
        return contractSettingMapper.findByContractId(contractId);
    }
}
